#ifndef MAP_H
#define MAP_H

#include "globals.h"
#include "Titleset.h"
#include "Perso.h"

class Map: public Titleset {
private:
	Map();
	Map(const Map&);
	Map& operator=(const Map&);
private:
	int mx,my;//x and y size of the map
	int sx,sy;//x and y size of the screen
	int px,py;//x and y position of the screen on the map
	unsigned int p;//number of players
	typedef vector<string> stv;
	typedef vector<stv> map_t;
	map_t map;
	typedef sf::Vector2f pos_t;
	typedef vector<pos_t> pos_ta;
	pos_ta perso_pos;
	bool read_map();
	vector<Perso*> persos;
	void _map();
public:
	Map(const char* cfile);
	Map(const string& sfile);
	virtual ~Map();
	bool init();
	int GetMapSizeX() const;
	int GetMapSizeY() const;
	int GetScreenSizeX() const;
	int GetScreenSizeY() const;
	bool add_player(Perso &pe);
	void draw_overlay_layer(unsigned int l) const;
	void draw_overlay() const;
};

#endif
